﻿using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace Share;

public class ResponseData
{
    [JsonPropertyName("reason")]
    public string Reason { get; set; } = "查询成功";

    [JsonPropertyName("token")]
    public string Token { get; set; } = string.Empty;

    [JsonPropertyName("result")]
    public string CipherText { get; set; } = string.Empty;

    [JsonPropertyName("timestamp")]
    public string Timestamp { get; set; } = string.Empty;

    [JsonPropertyName("tslen")]
    public int TSLen { get; set; }

    [JsonPropertyName("signdata")]
    public string SignData { get; set; } = string.Empty;

    [JsonPropertyName("errorcode")]
    public int ErrorCode { get; set; }
}

/// <summary>
/// 返回结果的 result 字段
/// </summary>
public class ResponseResultPlainText
{
    [JsonPropertyName("id")]
    public string Id { get; set; } = string.Empty;

    [JsonPropertyName("score")]
    [Range(0, 10)]
    public int Score { get; set; }
}